const state = {
    userData: {},
    ip: '',
    projects: [],
};
const getters = {};
const mutations = {};
const actions = {
    setUserData(context, userData) {
        context.state.userData = userData;
    },
    setUserProjects(context, projects) {
        context.state.projects = projects;
    },
    updateUserMessage(context, userData) {
        context.state.userData.nickname = userData.nickname;
        context.state.userData.gender = userData.gender;
        context.state.userData.avatar = userData.avatar;
    },
    setip(context, ip) {
        context.state.ip = ip;
    },
};

export default {
    namespaced: true,
    state,
    getters,
    mutations,
    actions
}